<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@page import="com.iwords.service.object.SysLibWordsEntity"%>
<%@page import="com.iwords.service.object.ExamSentencesEntity"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<title>列表</title>
</head>
<form method="post" action="wordsManager" name="myform"><input
	type="hidden" name="type" value="translation"> <input
	type="hidden" name="toPage" id="toPage" value=""> <span
	style="color: red;">这是第<%=(Integer.parseInt((String) request.getAttribute("toPage")) + 1)%>页
<br>
</span> <%
 	long count = Long.parseLong((String) request.getAttribute("count"));

 	long p = 0;
 	if (count % 20 == 0) {
 		p = count / 20;

 	} else {
 		p = (count / 20) + 1;
 	}

 	for (int i = 0; i < p; i++) {
 %> <a href="wordsManager?type=translation&toPage=<%=i%>"> <%=(i + 1)%></a>
&nbsp;&nbsp;&nbsp;&nbsp; <%
 	}
 %>

<table border=1>

	<tr>
		<td>句子</td>
		<td>翻译</td>
	</tr>
	<%
		java.util.List<ExamSentencesEntity> list = (java.util.List<ExamSentencesEntity>) request.getAttribute("sentenceList");

		if (list != null && list.size() > 0) {

			for (ExamSentencesEntity entity : list) {
	%>
	<tr>
		<td><%=entity.getSentence()%> <input type="hidden"
			name="sentenceids" id=<%=entity.getSentence()%>
			value=<%=entity.getSentenceid()%>></td>
		<td><input type="text" name=<%=entity.getSentenceid()%>
			value=<%=(entity.getParaphrase() == null ? "" : entity.getParaphrase())%>></td>
	</tr>
	<%
		}

		}
	%>
</table>
<a href="#"
	onclick="goSubmit(<%=(Integer.parseInt((String) request.getAttribute("toPage")) - 1)%>)">上一页
</a> &nbsp;&nbsp;&nbsp;&nbsp; <a href="#"
	onclick="goSubmit(<%=(Integer.parseInt((String) request.getAttribute("toPage")) + 1)%>)">下一页
</a> &nbsp;&nbsp;&nbsp;&nbsp;</form>
</body>

<script type="text/javascript">
	function goSubmit(page) {
		document.getElementById("toPage").value = page;
		document.myform.submit();
	}
</script>
</html>